<template>
  <div class="mains" v-loading="loading">
    <div class="login-content">
      <div class="container">
        <el-row class="row justify-content-center">
          <el-col :md="24" :lg="10" :xl="10">
            <div class="card">
              <div class="bg-login text-center">
                <div class="bg-login-overlay"></div>
                <div class="position-relative">
                  <div class="text-white font-size-20">欢迎回来 !</div>
                  <p class="text-white-50 mb-0">INIT SRC 管理后台</p>
                  <a href="index" class="logo logo-admin mt-4">
                    <img src="http://qovex-v.laravel.themesbrand.com/images/logo-sm-dark.png" alt="" height="30">
                  </a>
                </div>
              </div>
              <div class="card-body pt-5">
                <div class="p-2">
                  <el-form size="medium" :model="form" :rules="rules" ref="ruleForm">
                    <el-form-item label="用户名" prop="userName">
                      <el-input v-model="form.userName" placeholder="请输入用户名"></el-input>
                    </el-form-item>
                    <el-form-item label="密码" prop="password">
                      <el-input v-model="form.password" placeholder="请输入密码" show-password></el-input>
                    </el-form-item>
                    <el-form-item label="验证码" prop="code">
                      <el-input v-model="form.code" placeholder="请输入验证码">
                        <img @click="getVerifyCode()" slot="suffix" :src="imgCode" class="login_code_img" />
                      </el-input>
                    </el-form-item>
                  </el-form>
                  <div style="padding-top: 15px;">
                    <el-button class="login-btn" @click="onSubmit('ruleForm')" @keyup.enter.native="onSubmit('ruleForm')">登
                      录</el-button>
                    <span style="color: #F56C6C;font-size: 12px;">{{errorMsg}}</span>
                  </div>
                </div>
              </div>
            </div>

          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>

<script src="../js/index.js">
</script>

<style scoped>
  /* @import url("@/assets/style/myadmin.css"); */

  .mains {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: url(../../../assets/img/loginbg.jpg) no-repeat;
  }

  .login-content {
    margin-bottom: 3rem !important;
    margin-top: 3rem !important;
  }

  .justify-content-center {
    justify-content: center !important;
  }

  .login_code_img {
    width: 110px;
    height: 35px;
    padding: 5px;
    cursor: pointer;
  }

  img {
    vertical-align: middle;
    border-style: none;
  }

  .login-btn {
    width: 100%;
    background-color: #3b5de7;
    border-color: #3b5de7;
    color: white;
  }

  .card-body {
    flex: 1 1 auto;
    min-height: 1px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-top: 1.25rem;
    padding-bottom: 40px;
  }

  .card-body .el-form-item {
    margin-bottom: 10px;
  }

  .pt-5,
  .py-5 {
    padding-top: 3rem !important;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  .container {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
    margin-right: auto;
    margin-left: auto;
  }

  .card {
    margin-bottom: 24px;
    box-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03);
    overflow: hidden !important;
  }

  .card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 0 solid #f6f6f6;
    border-radius: 0.25rem;
  }

  .row {
    display: flex;
    flex-wrap: wrap;
  }

  .bg-login {
    background-image: url(../../../assets/img/logingif.gif);
    padding: 60px 0px;
    background-size: cover;
    background-position: center center;
    position: relative;
    border-radius: 0px 0px 50% 50%;
  }

  .text-center {
    text-align: center !important;
  }

  .bg-login-overlay {
    position: absolute;
    background: linear-gradient(to right, #273c92, #293e92);
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0px 0px 50% 50%;
    opacity: 0.8;
  }

  .position-relative {
    position: relative !important;
  }

  .font-size-20 {
    font-size: 20px !important;
    margin-bottom: 10px;
  }

  .text-white {
    color: #fff !important;
  }

  .text-white-50 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5) !important;
  }

  .mb-0,
  .my-0 {
    margin-bottom: 0 !important;
  }

  .logo-admin {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0px auto;
    width: 74px;
    height: 74px;
    line-height: 74px;
    background: #fff;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03);
  }

  .mt-4,
  .my-4 {
    margin-top: 1.5rem !important;
  }

  a {
    text-decoration: none !important;
  }

  @media (min-width: 576px) {
    .container {
      max-width: 440px;
    }
  }



  @media (min-width: 768px) {
    .container {
      max-width: 440px;
    }

    .login-content {
      padding-top: 3rem !important;
    }
  }

  @media (min-width: 992px) {
    .container {
      max-width: 440px;
    }

    .login-content {
      padding-top: 3rem !important;
    }
  }

  @media (min-width: 1200px) {
    .container {
      max-width: 1000px;
    }

    .login-content {
      padding-top: 3rem !important;
    }
  }
</style>
